Skip to content

Add .rcond() and .rcond_into() #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 26, 2017
Merged

Conversation

jturner314
Copy link
Member

This commit exposes the LAPACK *gecon routines through .rcond() and .rcond_into() methods. It also changes the character representations of NormType to capital letters to be compatible with *gecon.

This commit also changes the character representations of `NormType`
to capital letters to be compatible with `*gecon`.
Copy link
Member

@termoshtt termoshtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good :)
Please use opnorm_one instead of opnorm(One) since the type of the norm is fixed.

tests/solve.rs Outdated
@@ -5,6 +5,7 @@ extern crate num_traits;

use ndarray::*;
use ndarray_linalg::*;
use ndarray_linalg::lapack_traits::opnorm::NormType;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use opnorm_one. not to import lapack_traits

src/solve.rs Outdated
A::rcond(
self.a.layout()?,
self.a.as_allocated()?,
self.a.opnorm(NormType::One)?,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use opnorm_one

@@ -8,9 +8,9 @@ use types::*;

#[repr(u8)]
pub enum NormType {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to src/lapack_traits/mod.rs like UPLO

@jturner314
Copy link
Member Author

Good catch on the opnorm_one(). I didn't notice that method earlier.

I moved NormType to lapack_traits/mod.rs. Should lapack_traits::opnorm have pub use super::NormType, or just use super::NormType?

@termoshtt termoshtt merged commit 28f79ef into rust-ndarray:master Oct 26, 2017
termoshtt added a commit that referenced this pull request Oct 26, 2017
@termoshtt
Copy link
Member

termoshtt commented Oct 26, 2017

Thanks!

Should lapack_traits::opnorm have pub use super::NormType, or just use super::NormType?

I make it public.

@jturner314 jturner314 deleted the add-rcond branch October 26, 2017 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants